#include "red_mutex.h"
#include <cstdlib>

namespace red {
namespace hilos {
namespace thread {

Mutex::Mutex() {
	pthread_mutex_init(&m_Mutex, NULL);
}

Mutex::~Mutex() {
	pthread_mutex_destroy(&m_Mutex);
}

void Mutex::lock() {
	pthread_mutex_lock(&m_Mutex);
}

void Mutex::unlock() {
	pthread_mutex_unlock(&m_Mutex);
}

}
}
}
